<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>margin叠加</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            margin: 50px;
            background-color: skyblue;
        }

        .box2 {
            margin-top: 100px;
        }

        .h-div1 {
            height: 100px;
            width: 100px;
            margin-right: 50px;
            background-color: orange;
            display: inline-block;
        }

        .h-div2 {
            height: 100px;
            width: 100px;
            margin-left: 100px;
            background-color: orange;
            display: inline-block;
        }

    </style>
</head>
<body>
    <div class="box"></div>
    <div class="box box2"></div>
    <section>
        <div class="h-div1"></div>
        <div class="h-div2"></div>
    </section>
</body>
</html>